package byx.container.annotation.extension.impl;

import byx.container.annotation.extension.core.ClassPostProcessorContext;
import byx.container.annotation.extension.core.ClassProcessor;

import java.lang.reflect.Method;
import java.util.List;

/**
 * ContainerPostProcessor公共基类
 */
public abstract class BaseClassProcessor implements ClassProcessor {
    private final ClassScanner classScanner;
    
    protected BaseClassProcessor(ClassScanner classScanner) {
        this.classScanner = classScanner;
    }
    
    protected ClassPostProcessorContext getTypeContext(Class<?> type) {
        return classScanner.getTypeContext(type);
    }

    protected ClassPostProcessorContext getMethodContext(Method method) {
        return classScanner.getMethodContext(method);
    }

    protected List<ClassPostProcessorContext> getTypeAndMethodContexts(Class<?> type) {
        return classScanner.getTypeAndMethodContexts(type);
    }
}
